home *** CD-ROM | disk | FTP | other *** search
/ Ian & Stuart's Australian Mac 1993 September / September 93.iso / Archives / Comunications / telecom / Telecom Utilities / CTB Modem Tools / CEPT Modem Tool / CEPT Modem Tool.rsrc / TEXT_20000_Hayes 1200_2400.txt < prev    next >
Encoding:
Text File  |  1992-11-20  |  2.3 KB  |  171 lines

  1. ! Default Hayes Script - 06 June 1992
  2. !
  3. @ORIGINATE
  4. @ANSWER
  5. !
  6. @LABEL 1
  7. serreset 2400, 0, 8, 1
  8. !
  9. ! Load Factory configurations
  10. !
  11. @LABEL 2
  12. matchclr
  13. matchstr 1 3 "OK\13\10"
  14. write "AT&F\13"
  15. matchread 40
  16. jump 59
  17. !
  18. !    Set up the configuration:
  19. !    Echo off
  20. !
  21. @LABEL 3
  22. matchstr 1 4 "OK\13\10"
  23. write "ATE0\13"
  24. matchread 30
  25. jump 59
  26. !
  27. ! Next, reset on DTR transition, set direct mode
  28. !
  29. @LABEL 4
  30. matchstr 1 5 "OK\13\10"
  31. write "AT&D3\13"
  32. matchread 30
  33. jump 59
  34.  
  35. @LABEL 5
  36. matchstr 1 6 "\13\10"
  37. write "AT\\N0\13"
  38. matchread 30
  39. jump 59
  40. !
  41. ! If speaker on flag is true, jump to label 8.  Else turn off the speaker
  42. !
  43. @LABEL 6
  44. ifstr 2 8 "1"
  45. note "Speaker Off"
  46. pause 10
  47. matchstr 1 8 "OK"
  48. write "ATM0\13"
  49. matchread 30
  50. jump 59
  51. !
  52. ! The modem is ready so enable answering, or originate a call
  53. !
  54. @LABEL 8
  55. pause 10
  56. ifANSWER 30
  57. !
  58. ! @ORIGINATE
  59. !
  60. note "Dialing ^1" 3
  61. write "ATD^1\13"
  62. !
  63. @LABEL 9
  64. JSR 80
  65. matchread 700
  66. jump 59
  67. !
  68. !
  69. ! @ANSWER
  70. ! Set up the modem to answer
  71. @LABEL 30
  72. write "ATS0=1\13"
  73. matchstr 1 31 "OK\13\10"
  74. matchread 30
  75. jump 59
  76. !
  77. @LABEL 31
  78. jsr 80
  79. matchstr 16  32 "RING\13\10"
  80. matchread 700
  81. jump 31
  82. !
  83. @LABEL 32
  84. userhook 1
  85. note "Answering phone‚Ķ" 2
  86. jump 31
  87. !
  88. ! Standard responses
  89. !
  90. @LABEL 80
  91. matchclr
  92. matchstr 1 11 "CONNECT 1200\13\10"
  93. matchstr 2 12 "CONNECT 2400\13\10"
  94. matchstr 3 50 "NO CARRIER\13\10"
  95. matchstr 4 50 "ERROR\13\10"
  96. matchstr 5 52 "NO DIALTONE\13\10"
  97. matchstr 6 53 "BUSY\13\10"
  98. matchstr 7 54 "NO ANSWER\13\10"
  99. return
  100. !
  101. ! Connection established
  102. !
  103. @LABEL 11
  104. note "Communicating at 1200 bps." 2
  105. CommunicatingAt 1200
  106. jump 15
  107. !
  108. @LABEL 12
  109. note "Communicating at 2400 bps." 2
  110. CommunicatingAt 2400
  111. !
  112. @LABEL 15
  113. ifANSWER 16
  114. pause 20
  115. @LABEL 16
  116. exit 0
  117. !
  118. ! 50: error messages
  119. ! No carrier
  120. @LABEL 50
  121. exit -6021
  122. ! No Dial Tone
  123. @LABEL 52
  124. exit -6020
  125. ! Busy
  126. @LABEL 53
  127. exit -6022
  128. ! No Answer
  129. @LABEL 54
  130. exit -6023
  131. ! Modem error
  132. @LABEL 59
  133. exit -6019
  134. !
  135. ! Hang up the modem
  136. !
  137. @HANGUP
  138. Note "Disconnecting‚Ķ"
  139. @LABEL 60
  140. settries 0
  141. @LABEL 61
  142. write "ATH0\13"
  143. matchclr
  144. matchstr 1 62 "\13\10NO CARRIER\13\10"
  145. matchstr 2 62 "OK\13\10"
  146. matchstr 3 62 "ERROR\13\10"
  147. matchread 30
  148. inctries
  149. iftries 3 62
  150. ! no response, try escape sequence
  151. write "+++"
  152. matchclr
  153. matchstr 1 61 "OK\13\10"
  154. matchread 15
  155. ! try dropping DTR
  156. DTRClear
  157. pause 10
  158. DTRSet
  159. pause 10
  160. jump 61
  161. !
  162. ! Recall the factory settings
  163. !
  164. @LABEL 62
  165. write "AT&F\13"
  166. matchclr
  167. matchstr 1 63 "OK\13\10"
  168. matchread 30
  169. !
  170. @LABEL 63
  171. exit 0